package utilityPrograms;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;

import utils.StackTracePrinter;

public class FileToLowercase {

	
	public static void main(String[] args) {
		
		File f = new File ("k-words.txt");
		File f1 = new File ("k-words2.txt");
		
		try {
			f1.createNewFile();
			BufferedReader br = new BufferedReader(new FileReader(f));
			PrintWriter wr = new PrintWriter(f1);
			String line;
			while ((line=br.readLine()) != null) {
				line = line.toLowerCase();
				wr.println(line);
			}
			wr.close();
			br.close();
		
		
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			StackTracePrinter.print(e);
		} catch (IOException e) {
			// TODO Auto-generated catch block
			StackTracePrinter.print(e);
		}
		
	}
}
